import myRequest from './index';

export const getAreas = () => {
  return myRequest<any>('/api/map/region_tree');
};

export const getSinceYears = () => {
  const year = new Date().getFullYear();
  const list = Array.from(
    {
      length: 100,
    },
    (_, i) => year - i,
  );
  return list.map((v) => ({
    label: `${v}年`,
    value: v,
  }));
};
